package com.dinnerorders.web.windows.login;

import com.dinnerorders.web.enums.StyleNames;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;

public class LoginWindow extends Window {

    private LoginForm mLoginForm;

    public LoginWindow(String caption) {
        super(caption);
        initComponents();
        addComponents();
    }

    private void initComponents() {
        mLoginForm = new LoginForm();
        mLoginForm.setStyleName(StyleNames.LOGIN_FORM_STYLE_NAME.getStyleName());
    }

    private void addComponents() {
        VerticalLayout layout = new VerticalLayout();
        layout.setSizeFull();
        layout.addComponent(mLoginForm);
        setContent(layout);
    }
}
